package com.ease.lang
{
   /* http://scottbilas.com/blog/ultimate-as3-fake-enums/ */
   public class EnumConstants
   {
      public function EnumConstants(i_byIndex :Array)
      {
         byIndex = i_byIndex;
         
         for (var i :int = 0; i < byIndex.length; ++i)
         {
            var enumConstant :Enum = byIndex[i];
            byName[enumConstant.name.toLowerCase()] = enumConstant;
         }
      }
      
      public var byIndex :Array;
      public var byName :Object = {};
   }

}